﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ProjectsGrid.ascx.cs"
    Inherits="controls_ProjectsGrid" %>
<%@ Register Src="~/controls/HideColumn.ascx" TagName="HideColumn" TagPrefix="ctrl" %>
<%@ Register Src="~/controls/FactorsInapplicability.ascx" TagName="FactorsInapplicability" TagPrefix="ctrl" %>

<div style="overflow: auto;">
    <ctrl:HideColumn runat="server" ID="hideColumn" OnHideFieldEvent="HideField" />
    <asp:GridView ID="gvProjects" DataKeyNames="ID" runat="server" AllowSorting="true"
        OnSorting="gvProjects_Sorting" onrowdatabound="gvProjects_RowDataBound">
        <EmptyDataTemplate>
            <span>No projects</span></EmptyDataTemplate>
        <Columns>
            <asp:TemplateField>
                <ItemTemplate>
                    <asp:CheckBox ID="cb" runat="server" oncheckedchanged="cb_CheckedChanged" Visible='<%# Eval("ID") != "" %>' IdProject='<%# Eval("ID") %>' AutoPostBack="true" />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField>
                <ItemTemplate>
                    <ctrl:FactorsInapplicability ID="FactorsInapplicability" runat="server" Visible='<%# Eval("ID") != "" %>' IDProject='<%# Eval("ID") %>' />
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>    
</div>
